import { defHttp } from '@/utils/http/axios'
import { GetAccountInfoModel } from '../demo/model/accountModel'

enum Api {
  LINE_TOTAL_DATA = '/carbon/emission/totalLine',
  LINE_TYPE_DATA = '/carbon/emission/totalTypeLine',
  BAR_DATA = '/carbon/emission/totalTypePie',
}

export const getTotalLineData = (params) =>
  defHttp.get<GetAccountInfoModel>({ url: Api.LINE_TOTAL_DATA, params })
export const getTypeLineData = (params) =>
  defHttp.get<GetAccountInfoModel>({ url: Api.LINE_TYPE_DATA, params })
export const getBarData = (params) =>
  defHttp.get<GetAccountInfoModel>({ url: Api.BAR_DATA, params })
